package com.miracle9.game.dao;
import com.miracle9.game.entity.JoyPrivateDeskParameter;
import org.hibernate.Query;
import org.springframework.stereotype.Repository;

@Repository
public class JoyPrivateDeskParameterServiceDao extends SqlOperating<JoyPrivateDeskParameter, Integer>
{
  public JoyPrivateDeskParameter getJoyPrivateDeskParameter()
  {
    return (JoyPrivateDeskParameter)q_CreateSqlFilter("from JoyPrivateDeskParameter", new Object[0]);
  }
  
  public Integer updateLevelAndGameGold(JoyPrivateDeskParameter joyPrivateDeskParameter)
  {
    Query query = q_CreateSql("update JoyPrivateDeskParameter set level=:level,gameGold=:gameGold", new Object[0]);
    query.setProperties(joyPrivateDeskParameter);
    return query.executeUpdate();
  }
}
